package tec;

class PassagerStandard implements Usager {
    
    public PassagerStandard(String nom, int destination) {
	
	super(nom,destination);
	
    }
    
    public void nouvelArret(Bus bus, int numeroArret){
	if(numeroArret >= this.destination())
	    bus.demanderSortie(this);
    }
    
    public void monterDans(Transport t){
	//places assises prioritaires
	Bus bus = (Bus) t;
	if (bus.aPlaceAssise())
	    bus.demanderPlaceAssise(this);
	else if (bus.aPlaceDebout())
	    bus.demanderPlaceDebout(this);
	
    }
       
}
